home *** CD-ROM | disk | FTP | other *** search
- Path: soap.news.pipex.net!pipex!usenet
- From: Dirk Wessels <ge68@dial.pipex.com>
- Newsgroups: comp.object,comp.software-eng,comp.lang.c++
- Subject: Re: Moving from C to C++
- Date: 19 Feb 1996 10:35:08 GMT
- Organization: UnipalmPIPEX server (post doesn't reflect views of UnipalmPIPEX)
- Message-ID: <4g9jos$7cl@soap.news.pipex.net>
- References: <4fak3f$3op@news4.digex.net> <1996Feb9.233739.24043@amc.com> <4g8ctn$7do@news4.digex.net>
- NNTP-Posting-Host: aj114.du.pipex.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1 (Windows; I; 16bit)
-
- Hello,
-
- I did some OO programming in C and Pascal, later in C++, Delphi and
- Smalltalk.
-
- I implemented inheritance in C by making a function-table for each class
- and calling the functions indirectly.
- While I wanted to use C++ needed to use this because:
- 1. The system should be compatible with almost any other platform.
- Only GNU-C++ was fully compatible accross platforms,
- but was not available for all versions of Unix.
- 2. The program should be readable by other programmers.
- Most other programmers only knew C.
- 3. The other parts of the system were build in C and Fortran.
- If you are adding C++ as well to the language-set it gets
- very hard to fit them together.
- 4. The program should be able to compile for quite a few years.
- The C++ standard was changing and still is.
-
- It was rather cumbersome to define the function-tables each time again,
- but the program satisfied most of the requirements.
- The problem was that because of inheritance the program was hard
- to understand for other programmers, but any OOPL would have given
- this problem. Except that C is already quite hard to read.
-
-
- ell@access4.digex.net (Ell) wrote:
- >Curtis Green (curtis@amc.com) wrote:
- >: Ell (ell@access1.digex.net) wrote:
- >::Steven Hampson (steveh@jtec.com.au) wrote:
- >::: Perhaps there should be a distinction between the methodology and the tool
- >::: used to achieve that methodology. There is a general shift to the ADT, OOT
- >::: methodolgy, but this does not imply that there has to be a shift from C to
- >::: C++.
- >::: The best tool for the job is surely the tool that allows the job to be
- >::: done best.
- >::: This can be C, C++, Ada, Smalltalk, Assembler - whatever. Languauges
- >::: should be
- >::: chosen to fit the task at hand, not the other way round.
- >
- >: : Yeauh, but most find it cumbersome and a lot of work implementing
- >: : polymorphism using C.
- >
- >: Thats what steve said. If it is cumbersome and a lot of work implementing
- >: polymorphism in C, then find a language that makes it easier. C++ was
- >: developed to do just that, if going to OO ideas with a pile of C code
- >: that needs to be reused. If not, one of the other OO languages might
- >: make more sense.
- >
- >He also said that going to OOT does not imply there has to be a shift from
- >C to C++. He also mentioned possibly using assmbler for oot. While oot
- >is possible using C, or assembler in general why do oot without using an
- >oopl?
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- May this question be answered.
-
- >
- >Elliott
-
-
-
-